package com.eric.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.eric.bean.Student;
import com.eric.dao.StudentMapper;
import com.eric.service.StudentService;

@Service("StudentService")
public class StudentServiceImpl implements StudentService {

	@Resource
	private StudentMapper studentDao;
	@Override
	public Student getStudentById(int studentId) {
		
		return studentDao.selectByPrimaryKey(studentId);
	}

	@Override
	public int doAdd(Student student) {
		
		return this.studentDao.insert(student);
	}

	@Override
	public List<Map> list() {
		
		return this.studentDao.selectList();
	}

	@Override
	public List<Map> getFullStudent() {
		
		return null;
	}

	@Override
	public int delete(int id) {
		
		return this.studentDao.delete(id);
	}

	@Override
	public int update(Student stu) {
		
		return this.studentDao.update(stu);
	}

}
